package com.core.zyyz.amc.modules.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.core.zyyz.amc.modules.mapper.AmcCreditAgreementMapper;
import com.core.zyyz.amc.modules.domain.AmcCreditAgreement;
import com.core.zyyz.amc.modules.service.AmcCreditAgreementService;

/**
 * 授信额度Service业务层处理
 *
 * @author lfs
 * @date 2024-12-04
 */
@Service
public class AmcCreditAgreementServiceImpl implements AmcCreditAgreementService
{
    @Autowired
    private AmcCreditAgreementMapper amcCreditAgreementMapper;

    /**
     * 查询授信额度
     *
     * @param creditAgreementId 授信额度主键
     * @return 授信额度
     */
    @Override
    public AmcCreditAgreement selectAmcCreditAgreementByCreditAgreementId(String creditAgreementId)
    {
        return amcCreditAgreementMapper.selectAmcCreditAgreementByCreditAgreementId(creditAgreementId);
    }

    /**
     * 查询授信额度列表
     *
     * @param amcCreditAgreement 授信额度
     * @return 授信额度
     */
    @Override
    public List<AmcCreditAgreement> selectAmcCreditAgreementList(AmcCreditAgreement amcCreditAgreement)
    {
        return amcCreditAgreementMapper.selectAmcCreditAgreementList(amcCreditAgreement);
    }

    /**
     * 新增授信额度
     *
     * @param amcCreditAgreement 授信额度
     * @return 结果
     */
    @Override
    public int insertAmcCreditAgreement(AmcCreditAgreement amcCreditAgreement)
    {
        return amcCreditAgreementMapper.insertAmcCreditAgreement(amcCreditAgreement);
    }

    /**
     * 修改授信额度
     *
     * @param amcCreditAgreement 授信额度
     * @return 结果
     */
    @Override
    public int updateAmcCreditAgreement(AmcCreditAgreement amcCreditAgreement)
    {
        return amcCreditAgreementMapper.updateAmcCreditAgreement(amcCreditAgreement);
    }

    /**
     * 批量删除授信额度
     *
     * @param creditAgreementIds 需要删除的授信额度主键
     * @return 结果
     */
    @Override
    public int deleteAmcCreditAgreementByCreditAgreementIds(String[] creditAgreementIds)
    {
        return amcCreditAgreementMapper.deleteAmcCreditAgreementByCreditAgreementIds(creditAgreementIds);
    }

    /**
     * 删除授信额度信息
     *
     * @param creditAgreementId 授信额度主键
     * @return 结果
     */
    @Override
    public int deleteAmcCreditAgreementByCreditAgreementId(String creditAgreementId)
    {
        return amcCreditAgreementMapper.deleteAmcCreditAgreementByCreditAgreementId(creditAgreementId);
    }
}
